package hou.config

import com.typesafe.config.{Config, ConfigFactory}
import scalikejdbc.config.DBs

/**
  * 解析配置文件 application.conf
  */
object ConfigHelper {
  val load: Config = ConfigFactory.load()

  //解析spark.serializer
  val serializer: String = load.getString("spark.serializer")

  //解析日志文件路径
  val dmpDailyPath: String = load.getString("dmp.daily.path")

  //解析parquet文件路径
  val parquetPath: String = load.getString("dmp.parquet.path")

  //解析mysql连接驱动
  val url = load.getString("db.default.url")
  val user: String = load.getString("db.default.user")
  val password: String = load.getString("db.default.password")
  val driver: String = load.getString("db.default.driver")
  val table: String = load.getString("db.default.table")

  val setupMysql: Unit = DBs.setup()
}
